Creating custom property types

Properties are containers for different types of values with a common interface. This interface enables you to use properties in several places, such as scene graph and materials. For example, Kanzi provides all material values, including shader uniforms, as properties.In Kanzi properties are formed using two structures: property and property type. Property type defines what the property is like, including name, data type, and default value, while property defines a value. Each property is linked to a corresponding property type. Most of the property implementations are containers for basic primitives or structures, such as Booleans, floats, colors, and vectors, but can include other information too.

Note that animations can only animate floating point numbers. So, to animate properties that have more than one value (for example, color and transformation), you can split the property data into a set of floating point property data attributes (for example, the RGBA channels in a color property type).

Creating a custom property

To create a custom property:

  1. In the Library right-click Property Types and select Create Property Type.
    Property Type Editor opens.
  2. In the Property Type Editor set:
  3. Click Save.
    You can now use the property you created just like any other property in Kanzi.

See also

Property types